package org.flower.web.servlet;

import org.flower.entity.Statistics;
import org.flower.service.StatisticsService;
import org.flower.service.UserService;
import org.flower.service.impl.StatisticsServiceImpl;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

/**
 * @author Aizen
 */
@WebServlet("/manager/manageServlet")
public class ManageServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        StatisticsService statisticsService = new StatisticsServiceImpl();
        Statistics statistics = statisticsService.getStatistics();
        request.setAttribute("statistics",statistics);
        request.getRequestDispatcher("manage.jsp").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
